import demo.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        // 1. 获取 Spring 上下文
        ApplicationContext context =
                new ClassPathXmlApplicationContext("spring-config.xml");
        // 2. 获取 Bean 对象
        Student student = context.getBean("student", Student.class);
        // 3. 使用 Bean 对象
        student.Print();
    }
}
